﻿/****************************** Module Header ******************************\
 * Module Name:  tGeneralFile.cs
 * Module Version:  1.0.0 (2013-01-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;

namespace UCL.Data.ORM.UMD
{
	/// <summary>
    /// 通用-文件 数据实体类
	/// </summary>
    [DBTable(Common = "通用-文件")]
	public class tGeneralFile
	{
		/// <summary>
		/// Guid编号
		/// </summary>
		public Guid ID { get { return _ID ?? default(Guid); } set { _ID = value; } }

        [DBColumn(Alias = "Guid编号", IsKey = true, DefaultValue = "newid()")]
		private Guid? _ID;

		/// <summary>
        /// 文件标题
		/// </summary>
		public string Title { get { return _Title; } set { _Title = value; } }

        [DBColumn(Alias = "文件标题", Length = "32")]
		private string _Title;

		/// <summary>
        /// 图像地址
		/// </summary>
		public string ImageURL { get { return _ImageURL; } set { _ImageURL = value; } }

        [DBColumn(Alias = "图像地址", CanBeNull = true, Length = "255")]
		private string _ImageURL;

		/// <summary>
        /// 链接地址
		/// </summary>
		public string Link { get { return _Link; } set { _Link = value; } }

        [DBColumn(Alias = "链接地址", CanBeNull = true, Length = "255")]
		private string _Link;

		/// <summary>
        /// 文件后缀
		/// </summary>
		public string Ext { get { return _Ext; } set { _Ext = value; } }

        [DBColumn(Alias = "文件后缀", Length = "8")]
		private string _Ext;

		/// <summary>
        /// 文件体积
		/// </summary>
		public string Size { get { return _Size; } set { _Size = value; } }

        [DBColumn(Alias = "文件体积", CanBeNull = true, Length = "32")]
		private string _Size;

		/// <summary>
        /// 图片宽度
		/// </summary>
		public int Width { get { return _Width ?? default(int); } set { _Width = value; } }

        [DBColumn(Alias = "图片宽度", DefaultValue = "0")]
		private int? _Width;

		/// <summary>
        /// 图片高度
		/// </summary>
		public int Height { get { return _Height ?? default(int); } set { _Height = value; } }

        [DBColumn(Alias = "图片高度", DefaultValue = "0")]
		private int? _Height;

		/// <summary>
		/// 用户Guid编号
		/// </summary>
		public Guid UserID { get { return _UserID ?? default(Guid); } set { _UserID = value; } }

		[DBColumn(Alias="用户Guid编号", CanBeNull=true)]
		private Guid? _UserID;

		/// <summary>
		/// 用户帐号
		/// </summary>
		public string UserName { get { return _UserName; } set { _UserName = value; } }

		[DBColumn(Alias="用户帐号", CanBeNull=true, Length="32")]
		private string _UserName;

		/// <summary>
        /// 相册Guid编号
		/// </summary>
		public int AlbumID { get { return _AlbumID ?? default(int); } set { _AlbumID = value; } }

        [DBColumn(Alias = "相册Guid编号", CanBeNull = true)]
		private int? _AlbumID;

		/// <summary>
		/// 项目Guid编号(如：帖子编号)
		/// </summary>
		public Guid ItemID { get { return _ItemID ?? default(Guid); } set { _ItemID = value; } }

        [DBColumn(Alias = "项目Guid编号", Common = "如：帖子编号", CanBeNull = true)]
		private Guid? _ItemID;

		/// <summary>
		/// 项目所属表名称
		/// </summary>
		public string ItemType { get { return _ItemType; } set { _ItemType = value; } }

		[DBColumn(Alias="项目所属表名称", CanBeNull=true, Length="32")]
		private string _ItemType;

		/// <summary>
        /// 文件描述
		/// </summary>
		public string Description { get { return _Description; } set { _Description = value; } }

        [DBColumn(Alias = "文件描述", CanBeNull = true, DbType = "text")]
		private string _Description;

		/// <summary>
		/// 访问次数
		/// </summary>
		public int VisitCount { get { return _VisitCount ?? default(int); } set { _VisitCount = value; } }

		[DBColumn(Alias="访问次数", DefaultValue="0")]
		private int? _VisitCount;

		/// <summary>
		/// 回复次数
		/// </summary>
		public int ReplyCount { get { return _ReplyCount ?? default(int); } set { _ReplyCount = value; } }

        [DBColumn(Alias="回复次数", DefaultValue = "0")]
		private int? _ReplyCount;

		/// <summary>
        /// 下载次数
		/// </summary>
		public int DownloadCount { get { return _DownloadCount ?? default(int); } set { _DownloadCount = value; } }

        [DBColumn(Alias = "下载次数", DefaultValue = "0")]
		private int? _DownloadCount;

		/// <summary>
        /// 访问权限
        /// <para>""=不限,"friend"=仅好友,"user1,user2,..."=指定名称的好友</para>
		/// </summary>
		public string Access { get { return _Access; } set { _Access = value; } }

        [DBColumn(Alias = "访问权限", CanBeNull = true, Length = "Max")]
        private string _Access;

		/// <summary>
		/// 扩展标签
		/// </summary>
		public string ExTags { get { return _ExTags; } set { _ExTags = value; } }

		[DBColumn(Alias="扩展标签", Length="16")]
		private string _ExTags;

        /// <summary>
        /// 排列次序
        /// </summary>
        public short Ordinal { get { return _Ordinal ?? default(short); } set { _Ordinal = value; } }

        [DBColumn(Alias = "排列次序", DefaultValue = "999")]
        private short? _Ordinal;

		/// <summary>
		/// 状态
		/// </summary>
		public short State { get { return _State ?? default(short); } set { _State = value; } }

		[DBColumn(Alias="状态", DefaultValue="0")]
		private short? _State;

		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreatedTime { get { return _CreatedTime ?? default(DateTime); } set { _CreatedTime = value; } }

		[DBColumn(Alias="创建时间", DefaultValue="getdate()")]
		private DateTime? _CreatedTime;

		/// <summary>
		/// 最后更新时间
		/// </summary>
		public DateTime ModifiedTime { get { return _ModifiedTime ?? default(DateTime); } set { _ModifiedTime = value; } }

		[DBColumn(Alias="最后更新时间", CanBeNull=true)]
		private DateTime? _ModifiedTime;

		/// <summary>
		/// 是否删除
		/// </summary>
		public bool IsDeleted { get { return _IsDeleted ?? default(bool); } set { _IsDeleted = value; } }

		[DBColumn(Alias="是否删除", DefaultValue="0")]
		private bool? _IsDeleted;

		/// <summary>
		/// 网站标签
		/// </summary>
		public string SiteTag { get { return _SiteTag; } set { _SiteTag = value; } }

		[DBColumn(Alias="网站标签", CanBeNull=true, Length="16")]
		private string _SiteTag;

	}
}
